package com.cc.crm.controller;

import com.cc.crm.pojo.Authority;
import com.cc.crm.service.AuthorityService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * @program:
 * @ClassName:
 * @description:
 * @author: zgc
 * @date:
 * @Version 1.0
 **/
@Controller
@RequestMapping("/authority")
public class AuthorityController {
    @Resource
    private AuthorityService authorityService;
    
    @RequestMapping("/selectAuthority")
    @ResponseBody
    public List<Authority> selectAuthority(Authority authority) {
        List<Authority> authorityList = authorityService.selectAuthorities(authority);
        return authorityList;
    }
    
}
